package com.spzx.product.domain;


import com.baomidou.mybatisplus.annotation.TableField;
import com.spzx.common.core.annotation.Excel;
import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "商品分类")
public class Category extends BaseEntity {

    @Excel(name = "分类名称")
    private String name;
    @Excel(name = "图片地址")
    private String imageUrl;
    @Excel(name = "上级分类id")
    private Long parentId;

    private Long status;
    @Excel(name = "排序")
    private Long orderNum;

    @TableField(exist = false)
    private boolean hasChildren;

    @TableField(exist = false)
    private List<Category> children;


}
